<!doctype html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
	<link rel="icon" th:href="@{/img/icon.png}"/>
	<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" crossorigin="anonymous">
	<link rel="stylesheet" th:href="@{/css/global.css}" />
	<title>我的评论</title>
</head>
<body>
	<div class="nk-container">
		<!-- 头部 -->
		<header class="bg-dark sticky-top" th:replace="index::header">

		</header>

		<!-- 内容 -->
		<div class="main">
			<div class="container">
				<!-- 选项 -->
				<div class="position-relative">
					<ul class="nav nav-tabs">
                        <li class="nav-item">
                            <a th:class="|nav-link ${infoMode==0?'active':''}|" th:href="@{/manage}">用户管理</a>
                        </li>
                        <li class="nav-item">
                            <a th:class="|nav-link ${infoMode==1?'active':''}|" th:href="@{/manage/post}">博客管理</a>
                        </li>
                        <li class="nav-item">
                            <a th:class="|nav-link ${infoMode==2?'active':''}|" th:href="@{/manage/comment}">评论管理</a>
                        </li>
                    </ul>
				</div>
                <!--博客管理-->
                <div class="mt-4">
                    <h6><b class="square"></b> 博客管理(<i th:text="${postCount}"></i>)</h6>
                    <ul class="list-unstyled mt-4 pl-3 pr-3">
                        <li class="border-bottom pb-3 mt-4" th:each="map:${discussPosts}">
                            <div class="font-size-16 text-info mt-0 mb-3">
                                <a th:href="@{|/discuss/detail/${map.post.id}|}" th:utext="${map.post.title}" style="color:#69757d;font-size: 16px;font-weight:bold"></a>&nbsp;
                                <span class="badge badge-secondary bg-info" th:utext="${map.post.kindName}"></span>
                                <span class="badge badge-secondary bg-success" th:if="${map.post.category==0}">学生帖</span>
                                <span class="badge badge-secondary bg-muted" th:if="${map.post.category==1}">老师帖</span>
                                <a href="javascript:;" class="btn btn-danger btn-sm float-right" th:onclick="|setDelete(${map.post.id});|">删除</a>
                            </div>
                            <div class="text-left font-size-12 text-muted">
                                赞 <i class="mr-2" th:utext="${map.likeCount}"></i>|&nbsp;&nbsp;回复 <i class="mr-2" th:utext="${map.post.commentCount}"></i>
									&nbsp;<i class="mr-2" th:utext="${map.post.userName}"></i>&nbsp;
                                    发布于 <b th:text="${#dates.format(map.post.createTime, 'yyyy-MM-dd HH:mm:ss')}"></b>
                            </div>
                        </li>
                    </ul>
                    <!-- 分页 -->
                    <nav class="mt-5" th:replace="index::pagination">

                    </nav>
                </div>
			</div>
		</div>

		<!-- 尾部 -->
		<footer class="bg-dark" th:replace="index::footer">

		</footer>
	</div>

	<script src="https://s3.pstatp.com/cdn/expire-1-M/jquery/3.3.1/jquery.min.js" crossorigin="anonymous"></script>
	<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" crossorigin="anonymous"></script>
	<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" crossorigin="anonymous"></script>
	<script th:src="@{/js/global.js}"></script>
    <script th:src="@{/js/manage-post.js}"></script>
</body>
</html>
